import { createRouter, createWebHistory } from 'vue-router';
import AuthLayout from '@/views/AuthLayout.vue';
import LoginPage from '@/views/LoginPage.vue';
import RegisterPage from '@/views/RegisterPage.vue';
import FileSystem from '@/views/FileSystem.vue';
import versionPage from '@/views/versionPage.vue';
import FaceCamera from '@/components/FaceCamera.vue';
import Notarizationdocument from '@/components/Notarizationdocument.vue';
import UploadDialog from '@/components/UploadDialog.vue';
const routes = [
  { path: '/', redirect: '/login' },
  {
    path: '/',
    component: AuthLayout,
    children: [
      { path: '/login', name: 'Login', component: LoginPage },
      { path: '/register', name: 'Register', component: RegisterPage }
    ]
  },
  { path: '/filesystem', name: 'FileSystem', component: FileSystem },
  { path: '/version', name: 'versionPage', component: versionPage },
  { path: '/Face', name: 'FaceCamera', component: FaceCamera },
  { path: '/Nota', name: 'Notarizationdocument', component: Notarizationdocument },
  {
    path: '/upload',
    component: UploadDialog,
    props: (route) => ({
      folderId: route.query.folderId
    })
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
